package com.zhou.common.mybatis.template.shiro.ao;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhou.common.mybatis.template.shiro.enums.OnlineStatus;
import com.zhou.common.mybatis.template.shiro.enums.PolicyStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 在线用户记录
 * </p>
 *
 * @author zxf
 * @since 2023-02-20
 */
@Getter
@Setter
@TableName("sys_user_online")
@ApiModel(value = "SysUserOnline对象", description = "在线用户记录")
public class SysUserOnlineAo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户会话id", position = 1)
    @TableField("sessionId")
    private String sessionId;

    @ApiModelProperty(value = "登录账号", position = 2)
    private String loginName;

    @ApiModelProperty(value = "部门名称", position = 3)
    private String deptName;

    @ApiModelProperty(value = "登录IP地址", position = 4)
    private String ipaddr;

    @ApiModelProperty(value = "登录地点", position = 5)
    private String loginLocation;

    @ApiModelProperty(value = "浏览器类型", position = 6)
    private String browser;

    @ApiModelProperty(value = "操作系统", position = 7)
    private String os;

    @ApiModelProperty(value = "在线状态", position = 8)
    private OnlineStatus status;

    @ApiModelProperty(value = "在线状态s", position = 8)
    @Size(max = 3)
    private List<OnlineStatus> statuses;

    @ApiModelProperty(value = "session创建时间", position = 9)
    private LocalDateTime startTimestamp;

    @ApiModelProperty(value = "session最后访问时间", position = 10)
    private LocalDateTime lastAccessTime;

    @ApiModelProperty(value = "超时时间，单位为分钟", position = 11)
    private Integer expireTime;

    @ApiModelProperty(value = "政策状态", position = 12)
    private PolicyStatusEnum policyStatusEnum;

    @Size(max = 3)
    @ApiModelProperty(value = "政策状态s", position = 12)
    private List<PolicyStatusEnum> policyStatusEnums;

}
